package com.longyi.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.longyi.enums.SexEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@TableName(value = "user")
public class  User implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 住址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private SexEnum sex;

    /**
     * 电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 注册时间
     */
    @TableField(value = "register_time")
    private LocalDateTime registerTime;
    /**
     * 更新时间
     */
    @TableField(value = "update_time")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 删除标记 0-正常,1-删除
     */
    @TableLogic
    @TableField(value = "del_flag")
    private String delFlag;

    private static final long serialVersionUID = 1L;
}
